package com.project.logistics.service.imp;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.project.logistics.bean.Repairs;
import com.project.logistics.bean.User;
import com.project.logistics.mapper.UserMapper;
import com.project.logistics.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by94988 on 2021/3/16 16:28
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper,User> implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public User findUser(String userId) {
        return userMapper.getUser(userId);
    }

    @Override
    public List<Repairs> getRepairs(String userId){
        return userMapper.getRepairs(userId);
    }

    @Override
    public boolean deleteUserById(String id) {
        return userMapper.deleteUserById(id);
    }

    @Override
    public List<User> getUserByType(int type) {
        return userMapper.getUserByType(type);
    }

    @Override
    public int resetPassword(String userId) {
        return userMapper.resetPassword(userId);
    }




    @Override
    public void updatePassword(String newPassword,String userId){
        userMapper.updatePassword(newPassword,userId);
    }

}
